






template<typename T>
class RingQueue
{
private:
    std::vector<T> _ringqueue;
    int _max_cap;

    int _c_step;
    int _p_step;

    sem_t _data_sem;
    sem_t _space_sem;

public:
    RingQueue(int max_cap)
    :_ringqueue(max_cap),_max_cap(max_cap),_c_step(0),_p_step(0)
    {
        sem_init(&_data_sem,0,0);
        sem_init(&_space_sem,0,max_cap);
    }
    void Push(const T &in)   //生产者
    {


    }

    void Pop(T* out)
    {

    }



    ~RingQueue()
    {
        sem_destroy(&_data_sem);
        sem_destroy(&_space_sem)    
    }
};


